package com.dxt.springmvcdemo.annotation;

import com.dxt.springmvcdemo.validators.MySalaryValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(
        validatedBy = {MySalaryValidator.class}
)
public @interface Salary {
    String message() default "薪资不能为空且必须大于0";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
